package com.mike.median;


import com.mike.median.util.CalculateUtils;
import com.mike.median.util.FileUtils;

import java.io.IOException;
import java.util.Arrays;

public class MainTest {
    public static void main(String[] args) {
        try {
            Integer[] a = CalculateUtils.tansToIntArray(FileUtils.readTxtFile("median/src/main/resources/f1.txt"));
            Integer[] b = CalculateUtils.tansToIntArray(FileUtils.readTxtFile("median/src/main/resources/f2.txt"));
            Arrays.sort(a);
            Arrays.sort(b);
            System.out.println(CalculateUtils.findMedianArrays(a, b));
        } catch (IOException ioexception) {
            ioexception.printStackTrace();
        }
    }

}
